import Cookies from 'js-cookie'

// 处理用户 token
const USER_TOKEN_KEY = 'bkpx-2021-user-token'

export const setToken = (token) => {
    Cookies.set(USER_TOKEN_KEY, token, { expires: 7 })
}

export const getToken = () => {
    return Cookies.get(USER_TOKEN_KEY)
}

export const removeToken = () => {
    Cookies.remove(USER_TOKEN_KEY)
}
